import { sysDataDic, AuditConfig } from "@/types/api";
import { get, post } from "../utils/request"

// 数据字典-列表
export const loadSysDataDic = ( params: any ) => {
  return post( "/cdwl-pay-base-service/sysDataDic/pageQuery", params )
}

// 数据字典-新增
export const addSysDataDic = ( params: sysDataDic ) => {
  return post( "/cdwl-pay-base-service/sysDataDic/insert", params )
}

// 数据字典-编辑
export const editSysDataDic = ( params: sysDataDic ) => {
  return post( "/cdwl-pay-base-service/sysDataDic/update", params )
}

// 数据字典-删除
export const deleteSysDataDic = ( id: string | number ) => {
  return post( `/cdwl-pay-base-service/sysDataDic/delete?id=${id}`, null )
}

// 数据字典-查询
export const geteSysDataDicById = ( id: string | number ) => {
  return post( `/cdwl-pay-base-service/sysDataDic/selectById?id=${id}`, null )
}


// 审核配置-列表
export const loadAuditConfig = ( params: any ) => {
  return post( "/cdwl-pay-base-service/sysAuditConfig/pageQuery", params )
}

// 审核配置-编辑
export const editAuditConfig = ( params: AuditConfig ) => {
  return post( "/cdwl-pay-base-service/sysAuditConfig/update", params )
}

// 审核配置-新增
export const addAuditConfig = ( params: AuditConfig ) => {
  return post( "/cdwl-pay-base-service/sysAuditConfig/insert", params )
}

// 审核配置-审核人鉴权
export const auditUserAuth = ( params: any ) => {
  return post( `/sysAuditConfig/auditUserAuth`, params )
}

// 数据字典-删除
export const deleteAuditConfigById = ( id: string | number ) => {
  return post( `/cdwl-pay-base-service/sysAuditConfig/delete?id=${id}`, null )
}

// 数据字典-查询
export const getAuditConfigById = ( id: string | number ) => {
  return post( `/cdwl-pay-base-service/sysAuditConfig/selectById?id=${id}`, null )
}

// 系统日志-审核日志
export const loadSysAuditLog = ( params: any ) => {
  return post( `/cdwl-pay-base-service/sysAuditLog/pageQuery`, params )
}

// 系统日志-异常日志
export const loadSysLogError = ( params: any ) => {
  return post( `/cdwl-pay-base-service/sysLogError/pageQuery`, params )
}

// 系统日志-操作日志
export const loadSysLogOperation = ( params: any ) => {
  return post( `/cdwl-pay-base-service/sysLogOperation/pageQuery`, params )
}